package com.mybatis.dao;

import com.mybatis.bean.Publisher;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PublisherDao {
    void addPublisher(Publisher publisher);
    List<Publisher> findAllPublisherLazyLoading();
    List<Publisher> findAllBookByPublisher(Publisher publisher);
    List<Publisher> findAllPublisherWithBooks();
    Publisher findPublisherById(Publisher publisher);

    @Select("select * from tb_publisher where id = #{id}")
    Publisher findPublisherById2(Integer id);
}
